<div ng-init="dvm.init()">
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.close()">&times;</button>
    <winresize on-changed="dvm.resize"></winresize>
    <h4 class="modal-title">文件变更历史</h4>
  </div>
  <div class="modal-body">
    <form ng-submit="dvm.search()" novalidate>
      <div class="form-group">
        <div class="input-group">
          <input type="text" class="form-control" ng-model="dvm.query" placeholder="文件夹/文件名" autofocus>
          <span class="input-group-btn">
            <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
          </span>
        </div>
      </div>
    </form>
    <div class="history-wrapper" style="max-height:700px;overflow-y:auto">
      <table class="table table-bordered table-responsive">
        <thead>
          <tr>
            <th width="27%">SHA</th>
            <th width="23%">MESSAGE</th>
            <th width="20%">DIFF FILES</th>
            <th width="15%">DATE</th>
            <th width="15%">COMMITTER</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="commit in dvm.commits">
            <td>{{commit.sha}}</td>
            <td title="{{commit.message}}">{{commit.message}}</td>
            <td>
              <div ng-repeat="file in commit.files">
                <span ng-bind-html="file.status | fileStatus"></span>
                <a href="javascript:void(0)" ng-bind-html="file.path | fileKeyword:dvm.query"
                    ng-click="dvm.show(commit, file)"></a>
              </div>
            </td>
            <td align="center">{{commit.date | date:'yyyy/MM/dd HH:mm:ss'}}</td>
            <td>{{commit.email}}</td>
          </tr>
        </tbody>
      </table>
      <button class="btn btn-default btn-block" ng-click="dvm.load()" ng-if="!dvm.ending">加载更多...</button>
    </div>
  </div>
</div>
